
#ifndef DECL_H
#define DECL_H

#include "ast.h"
#include "type.h"
#include "symbol.h"
#include "stmt.h"
#include "expr.h"
#include <stdio.h>

struct decl {
	char *name;
	int nlocals;
	struct type *type;
	struct expr *value;
	struct stmt *code;
	struct symbol *symbol;
	struct decl *next;
};

struct decl * decl_create( 
      char * name, 
      int nlocals, 
      struct type * type, 
      struct expr * value, 
      struct stmt * code, 
      struct symbol * symbol, 
      struct decl * next);
      
      
void decl_print  ( struct decl  * decl    ); 
void decl_resolve( struct decl *d, int print );
void decl_typecheck( struct decl *d );
void decl_generate( FILE *f, struct decl *d );

#endif


